#coding:utf-8
a = {'a':'hahha','b':'xixi','c':'xixi','d':'haha'}
#key_list = []
search_value = 'haha'
#for x,y  in a.items():
 #   if  y == search_value:
#          key_list.append(x)
#print key_list

'''
   def 定义了一个字典查找你所想要的单词的封装

'''

def search(keyword,content):
    key_list = []
    search_value = keyword
    for x, y in content.items():
        if y == search_value:
            key_list.append(x)
    return key_list
c =  search(search_value,a)
print c


d = "aAsmriddbgsDlsfeAF"
e  = list(d)
e.sort()
print e


ainfo  = {'b':'python','a':'haha','c':'hehe','f':'xiaoming'}
for key in ainfo:
    print key
